Skip to content

Conversation

@darrell-k
Copy link
Owner

The objective here is to store the context in which items were added to the play queue (specifically, did the added play queue items originate from a Works browse or not).

This data can then be used by clients to assist in grouping play queue entries.

This is achieved by adding a new flag to the player's m3u file - #ADDEDFROMWORK.

Play queue entries are written/retrieved using a Track object. Therefore I've added a Virtual Column to that object to facilitate passing in and out the necessary data.

This has required adding a extra CPAN module - nothing too big, it's 10k in size.

See detailed notes added against the changed code.

michaelherger and others added 30 commits November 29, 2024 13:44
…mserver-platforms` repo to LMS core.

We still have to keep the `Custom.pm` around to tell LMS to use `Docker.pm`, as Linux run in Docker can't recognize it's actually a container.
But don't create a new DB version for this. Just drop it when we happen to re-build.
We must define the workflow inputs, not only the reference. The latter is only used to tell where to use the workflow from, but not what branch to build from.
`gdresize.pl` must have been broken for a decade or more. Ever since we stopped using `Cache::FileCache`.

The Control Panel only ever was used on Windows 32-bit. Let's get rid of it.
Upgraded Websocket handler
Don't convert payload to UTF8 if the call is server ping
Add Simple Async Web Sockets
Corrected formatting and typos in the example
michaelherger and others added 10 commits March 20, 2025 16:32
Going forward the repository files should provide a simple md5 hash to verify the installers authenticity. Use it to verify the file after download.

Signed-off-by: Michael Herger <[email protected]>
The MusicBrainz-supported ORIGINALDATE was added to Ogg with
3beabe2.

Signed-off-by: Jonny Bylsma <[email protected]>
…r-Wav-and-Opus

Update ConnectionManager.pm to add checks for Wav and Opus
Previously the plugin only registered for LMS events when the Control Point subscribed to UPnP events.
This meant the play state was not updated for Control Points that did not support UPnP eventing.
This change fixes that.

Signed-off-by: BoringName15 <[email protected]>
if (defined(my $work_id = $request->getParam('work_id')) && $work_id eq '-1') {
$what->{'track.work'} = { '!=' => [undef] };
}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An incidental enhancement to allow work_id:-1 in the playlistcontrol command so that when adding multiple works in one go (eg all for a composer or genre) only tracks that are part of a work are added.

$track->added_from_work("1");
}
}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we set the virtual column if the queue entries are being added via a work browse.

$count++
}
$count = 0;

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build a hash keyed by playlist index number to store the virtual column.

}
}
else {
$data->{'added_from_work'} = $addedFromWork{$count};
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now add the virtual column to the $data passed in to _addSong


$returnHash{id} = $res->{'tracks.id'};
$returnHash{title} = $res->{'tracks.title'};
$returnHash{added_from_work} = $res->{added_from_work} if $res->{added_from_work};
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the virtual column to the returned data if it exists


if ( !scalar keys %{$attributes} ) {
$track = Slim::Schema->objectForUrl($entry);
$track->added_from_work($addedFromWork);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the flag to the Track object.


main::DEBUGLOG && $log->debug(" found addedFromWork: $addedFromWork");
}

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the flag from the player playlist file.


if (my $addedFromWork = $item->get_column('added_from_work')) {
print $output "#ADDEDFROMWORK:$addedFromWork\n";
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write the flag to the m3u file.

);

$class->add_virtual_columns('added_from_work');

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add the virtual column to the Track class.

mw9 and others added 11 commits March 26, 2025 16:18
At present there is no way to clear the item from the current playlist
when the playlist only contains that one item.

This change restores the ability to remove that item from the playlist
by adding the "Remove from playlist" context menu item, even when the
playlist only that 1 item.

This option had historically been present, but was removed in commit 71e36d4
(Unnecessary items in context menu for current-playlist tracks, 2012-02-22).

Signed-off-by: Martin Williams <[email protected]>
…_with_one_item

Fix: BUG 17980 - Allow item removal even if playlist has only 1 item
We've seen this step fail on macOS quite a bit. A re-run would "fix" it.

Signed-off-by: Michael Herger <[email protected]>
…t-handler

Update AVTransport.pm to move LMS event registration
Signed-off-by: darrell-k <[email protected]>
Signed-off-by: darrell-k <[email protected]>
Signed-off-by: darrell-k <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.